{* 
//////
//    @version [ Masterton ]
//    @package hwdVideoShare
//    @copyright (C) 2007 - 2009 Highwood Design
//    @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
//////
//    hwdVideoShare Template System:::This template system uses the Smarty Template Engine. 
//    For full documentation, including syntax usage please refer to http://www.smarty.net 
//    or our website at http://www.hwdmediashare.co.uk   
//////
//    This file generates the display for the hwdVideoShare component homepage.
//////
//    VARIABLES AVAILBLE IN THIS TEMPLATE FILE:                                        
//    -- $print_nowlist........Only set if any videos are being watched now
//    -- $print_featured.......Only set if any videos are featured
//    -- $print_ads............Only set if hwdRevenueManager is installed   
//    -- $print_videolist......Only set if there are any videos
//    -- $list.................Array containing main video list data  
//    -- $pageNavigation.......Page navigation code 
//    -- $print_mostviewed.....Only set if there are any "most viewed" videos
//    -- $mostviewedlist.......Array containing main "most viewed" list data  
//    -- $print_mostfavoured...Only set if there are any "most favoured" videos
//    -- $mostfavouredlist.....Array containing main "most favoured" list data  
//    -- $print_mostpopular....Only set if there are any "most popular" videos
//    -- $mostpopularlist......Array containing main "most popular" list data  
//////
*}

{include file='header.tpl'}

{if $print_mostviewed or $print_mostviewed or $print_mostpopular}
<div class="sic-container">
  
  <div id="sic-right" class="sic-right">

    {if $print_mostviewed}
    <div class="standard-right">
    <div class="padding">
      <h2>{$title_mostviewed}</h2>
    </div>
      <div class="xmllist">
        <div class="box">
          {foreach name=outer item=data from=$mostviewedlist}
	  {include file="video_list_simple.tpl"}
	  <div style="clear:both;"></div>
          {/foreach}
        </div>
      </div>  
    </div>
    {/if}
	  
    {if $print_ads}{if $advert4}<div class="standard-right"><div class="padding"><div id="hwdadverts-nopadding">{$advert4}</div></div></div>{/if}{/if}
    
    {if $print_mostfavoured}
    <div class="standard-right">
    <div class="padding">
      <h2>{$title_mostfavoured}</h2>
    </div>
      <div class="xmllist">
        <div class="box">
          {foreach name=outer item=data from=$mostfavouredlist}
	  {include file="video_list_simple.tpl"}
	  <div style="clear:both;"></div>
          {/foreach}
        </div>
      </div>  
    </div>
    {/if}

    {if $print_mostpopular}
    <div class="standard-right">
    <div class="padding">
      <h2>{$title_mostpopular}</h2>
    </div>
      <div class="xmllist">
        <div class="box">
          {foreach name=outer item=data from=$mostpopularlist}
	  {include file="video_list_simple.tpl"}
	  <div style="clear:both;"></div>
          {/foreach}
        </div>
      </div>  
    </div>
    {/if}
  
  </div>
  
  <div class="sic-center">
{/if}
  
    {if $print_featured}
      <div class="hwdmodule-h3">
        {if $print_featured_player}
          {include file="featured_videos_01.tpl"}
        {else}
          {include file="featured_videos_02.tpl"}
        {/if}
      </div>
    {/if}

    {if $print_ads}{if $advert3}<div class="standard"><div class="padding"><div id="hwdadverts-nopadding">{$advert3}</div></div></div>{/if}{/if}
    
    {if $print_nowlist}
      <div class="hwdmodule-h4">
        {include file="video_beingwatched.tpl"}
      </div>
    {/if}
    
    <div class="standard">
      <div class="padding">
      <h2>{$smarty.const._HWDVIDS_RECENT}</h2>
      {if $print_videolist}

          {foreach name=outer item=data from=$list}
	    {include file="video_list_block.tpl"}
	  {if $smarty.foreach.outer.last}
	     <div style="clear:both;"></div>
	  {elseif $smarty.foreach.outer.index % $vpr-($vpr-1) == 0}
	     <div style="clear:both;"></div>
	  {/if}
          {/foreach}
      
      {else}
        <div class="padding">{$smarty.const._HWDVIDS_INFO_NRV}</div>
      {/if}
      </div>
      {$pageNavigation}
    </div>

{if $print_mostviewed or $print_mostviewed or $print_mostpopular}
  </div>
</div>
{/if}
<div style="clear:both;"></div>

{literal}
<script language='javascript' type='text/javascript'>
	var fullWidth = document.getElementById("hwdvids").offsetWidth;
	var sideWidth = fullWidth - {/literal}{$flvplay_width}{literal};
	document.getElementById("sic-right").style.width = sideWidth + "px";
	aL
</script>
{/literal}

{include file='footer.tpl'}
